package com.lingchou.cloud.process.api.dto.param.base;

import com.lingchou.cloud.process.api.enums.ProcessNodeTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@Getter
@Setter
@ToString
@Builder
@ApiModel(value = "NodeStartParam", description = "节点启动参数类")
public class NodeStartParam {

    /**
     * 节点定义ID
     */
    @ApiModelProperty(value = "节点定义ID")
    @NotBlank(message = "节点定义ID不能为空")
    private String taskDefId;

    /**
     * 节点类型
     */
    @ApiModelProperty(value = "节点类型")
    @NotNull(message = "节点类型必传")
    private ProcessNodeTypeEnum nodeType;

    /**
     * 人员集合
     */
    @ApiModelProperty(value = "人员集合")
    @NotNull(message = "节点人员必传")
    @NotEmpty(message = "节点必须有执行人")
    private List<String> personColl;


    /**
     * 截止时间变量名称
     */
    @ApiModelProperty(value = "截止时间变量名称",notes = "截止时间，要求遵循ISO8601规范")
    private String dueTimeString;
}
